﻿using Leo.Common.MQ;
using System.Diagnostics.CodeAnalysis;

namespace Leo.Common.RabbitMQ
{
    //[NullableContext(1)]
    //[Nullable(0)]
    public abstract class RabbitMessageBase : IMessageModel
    { 
        public abstract string GetDestination();
         
        public string GetMessageJson()
        {
            return JSON.Serialize(this);
        }
         
        public abstract string GetMessageType();
         
        [return: MaybeNull]
        public virtual MessageProperty GetProperties()
        {
            return null;
        }
    }
}
